﻿using SqlSugar;
using System;
using System.ComponentModel;

namespace MediaBusiness.Dto
{
    /// <summary>
    /// 剧头表
    /// </summary>
    [SugarTable("C2InMediaHeads")]
    public class MediaHeadsDto
    {
        /// <summary>
        /// 序号
        /// </summary>
        [DisplayName("序号")]
        [SugarColumn(ColumnName = "ID", IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        /// <summary>
        /// 工单动作 Regist Update Delete
        /// </summary>
        [DisplayName("动作")]
        [SugarColumn(ColumnName = "Action")]
        public string Action { get; set; }
        /// <summary>
        /// 内容商账号
        /// </summary>
        [DisplayName("内容商账号")]
        [SugarColumn(ColumnName = "CSPID")]
        public string CSPID { get; set; }
        /// <summary>
        /// 工单流水号
        /// </summary>
        [DisplayName("工单流水号")]
        [SugarColumn(ColumnName = "CorrelateID")]
        public string CorrelateID { get; set; }
        /// <summary>
        /// 介质编号
        /// </summary>
        [DisplayName("介质编号")]
        [SugarColumn(ColumnName = "MediaID")]
        public string MediaID { get; set; }
        /// <summary>
        /// 介质编码
        /// </summary>
        [DisplayName("介质编码")]
        [SugarColumn(ColumnName = "MediaCode")]
        public string MediaCode { get; set; }
        /// <summary>
        /// 介质名称
        /// </summary>
        [DisplayName("介质名称")]
        [SugarColumn(ColumnName = "MediaName")]
        public string MediaName { get; set; }
        /// <summary>
        /// 一级分类 电影、电视剧、综艺、动漫等
        /// </summary>
        [DisplayName("一级分类")]
        [SugarColumn(ColumnName = "MediaType")]
        public string MediaType { get; set; }
        /// <summary>
        /// 介质类型 单集、多集
        /// </summary>
        [DisplayName("介质类型")]
        [SugarColumn(ColumnName = "Pattern")]
        public int Pattern { get; set; }

        [DisplayName("介质类型")]
        [SugarColumn(IsIgnore = true)]
        public string PatternCaption
        {
            get
            {
                string tmpStr = "";
                switch (Pattern)
                {
                    case 1:
                        tmpStr = "多集";
                        break;
                    default:
                        tmpStr = "单集";
                        break;
                };
                return tmpStr;
            }
        }

        /// <summary>
        /// 版权开始日期
        /// </summary>
        [DisplayName("版权开始日期")]
        [SugarColumn(ColumnName = "LicensingStart")]
        public string LicensingStart { get; set; }
        /// <summary>
        /// 版权结束日期
        /// </summary>
        [DisplayName("版权结束日期")]
        [SugarColumn(ColumnName = "LicensingEnd")]
        public string LicensingEnd { get; set; }
        /// <summary>
        /// 审核状态
        /// </summary>
        [DisplayName("审核状态")]
        [SugarColumn(ColumnName = "AuditStat")]
        public int AuditStat { get; set; }
        /// <summary>
        /// 审核状态
        /// </summary>
        [DisplayName("审核状态")]
        [SugarColumn(IsIgnore = true)]
        public string AudistStatStr
        {
            get
            {
                string tmpStr = "";
                switch (AuditStat)
                {
                    case 1:
                        tmpStr = "通过";
                        break;
                    default:
                        tmpStr = "未通过";
                        break;
                };
                return tmpStr;
            }
        }
                 
        /// <summary>
        /// 审核时间
        /// </summary>
        [DisplayName("审核时间")]
        [SugarColumn(ColumnName = "AuditTime")]
        public DateTime AuditTime { get; set; }
        /// <summary>
        /// 数据可用性
        /// </summary>
        [DisplayName("数据可用性")]
        [SugarColumn(ColumnName = "BEnable")]
        public bool BEnable { get; set; }
        /// <summary>
        /// 建档时间
        /// </summary>
        [DisplayName("建档时间")]
        [SugarColumn(ColumnName = "CreateTime")]
        public DateTime CreateTime { get; set; }
    }
}
